12 #ifndef __CH_Collection_h__
13 #define __CH_Collection_h__
75 #define CAST_OPCHANNELS(collection) ((collection) ? (collection)->castToOPChannels() : nullptr)
100 virtual int64 getMemoryUsage(
bool inclusive)
const;
107 virtual int canAccess(
uint mask)
const;
127 int getChannelNames(
CH_NameList &list,
int scope=0)
const;
128 int getChannelCount(
int scoped = 0)
const;
150 virtual int rename(
const char *from_name,
const char *to_name,
151 const char *to_alias);
153 const char *to_alias);
156 int deleteChannels();
162 bool no_disabling ,
int thread);
164 fpreal *vals,
int nsamples,
166 bool use_cache ,
int thread);
175 void unresolveLocalVars(
int thread);
183 bool use_alias=
false)
const;
185 bool use_alias=
false)
const
188 getFullPath(chp, s, use_alias);
198 void *
data =
nullptr)
const;
202 void findString(
const char *word,
bool fullword,
204 void *
data =
nullptr);
205 int findString(
const char *word,
bool fullword,
206 bool usewildcards)
const;
207 int changeString(
const char *from,
const char *to,
208 bool fullword,
int thread);
216 virtual int getUniqueId()
const;
228 virtual const void *getOwner()
const = 0;
229 virtual void *getOwner() = 0;
237 virtual bool getVariableValue(
UT_String &str,
240 virtual bool getVariableValue(
fpreal &
val,
249 int save(std::ostream &os,
bool binary,
bool compiled,
250 bool scoped,
bool pending_state,
252 int saveToFile(
const char *nm)
const;
254 template <
typename FPREAL_TYPE>
258 bool delete_keys =
false);
259 int loadFromFile(
const char *nm);
268 virtual void saveChannelForUndo(
CH_Channel *chp) = 0;
276 void setExpose(
bool onoff );
282 void clearAndDestroy();
287 { myVariables[0] =
table; }
290 {
return myManager->getGlobalStart(); }
292 {
return myManager->getGlobalEnd(); }
300 bool &timedep,
int thread);
303 { myVariables[3] =
table; }
309 void addedParamDependency();
310 void removeParamDependency();
321 {
return myExternal; }
323 { myExternal = yesno; }
332 static bool isValidChannelName(
const char *
s);
340 virtual void addLocalVarDependency(
int table,
int index,
356 int err = ev_GetErrNo(thread);
358 evaluationError(chp, err, thread);
362 { myVariables[2] =
table; }
369 virtual void notifyChannelRenameDependents(
const char *old_name,
370 const char *new_name);
381 myChannelAliasesTable;
387 char myParamDependent;
394 void evaluationError(
const CH_Channel *chp,
int err,
399 template <
typename FPREAL_TYPE>
CH_Manager * getManager() const
#define SETUPCLASSPACKETID(classname)
GT_API const UT_StringHolder time
void setExternal(bool yesno)
const GLuint GLenum const void * binary
GLsizei const GLchar *const * path
void updateGlobalVariables(CH_LocalVariable *table)
**But if you need a result
void addLocalVariables(CH_LocalVariable *table)
void addDynamicVariables(CH_LocalVariable *table)
GU_API GA_Offset getParent(const GU_Detail *gdp, const GA_Offset &node)
const CH_Channel * getChannel(int idx) const
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
fpreal getGlobalEnd() const
GU_API GA_OffsetArray getChildren(const GU_Detail *gdp, const GA_Offset &node, bool recurse=false)
PXL_API const char * getName(const ColorSpace *space)
Return the name of the color space.
void getFullPath(const CH_Channel *chp, UT_String &p, bool use_alias=false) const
CH_Channel * getChannel(int idx)
fpreal getTolerance() const
const CH_ChannelList * getChannels() const
GLuint const GLchar * name
CH_API void CHcollectionsToOPchannels(CH_CollectionList const &collections, UT_ValArray< OP_Channels * > &op_channels)
virtual OP_Channels * castToOPChannels()
GLenum GLenum GLsizei void * table
SYS_FORCE_INLINE void checkEvaluationError(const CH_Channel *chp, int thread) const
fpreal getGlobalStart() const
static const char * theValidChannelNameWordBreaks
**Note that the tasks the is the thread number *for the or if it s being executed by a non pool thread(this *can happen in cases where the whole pool is occupied and the calling *thread contributes to running the work load).**Thread pool.Have fun
int(*)(CH_Collection *grp, CH_Channel *chp, void *) CHfindCallBack
UT_ArrayStringMap< CH_Channel * > CH_ChannelMap
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
virtual const OP_Channels * castToOPChannels() const
ImageBuf OIIO_API channels(const ImageBuf &src, int nchannels, cspan< int > channelorder, cspan< float > channelvalues={}, cspan< std::string > newchannelnames={}, bool shuffle_channel_names=false, int nthreads=0)
PcpNodeRef_ChildrenIterator begin(const PcpNodeRef::child_const_range &r)
Support for range-based for loops for PcpNodeRef children ranges.